package com.zhuliwei.enums;
/**
 * 枚举封装
 *
 * @author 朱力维
 * @time 2022/10/7 11:44
 **/
public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    NEED_LOGIN_AGAIN(401,"登录状态过期，请重新登录"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    USERNAME_EXIST(501,"用户名已存在"),
    PHONENUMBER_EXIST(502,"手机号已存在"), EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    REQUIRE_PASSWORD(505, "必需填写密码"),
    LOGIN_ERROR(506,"用户名或密码错误"),
    FILE_TYPE_ERROR(507,"请上传PNG/JPG类型的文件"),
    CONTENT_NOT_NULL(508, "评论内容不能为空"),
    USERNAME_NOT_NULL(509, "用户名不能为空"),
    NICKNAME_NOT_NULL(510, "昵称不能为空"),
    PASSWORD_NOT_NULL(511, "密码不能为空"),
    AUTHCODE_NOT_NULL(512, "验证码不能为空"),
    EMAIL_NOT_NULL(513, "邮箱不能为空"),
    NICKNAME_EXIST(514, "昵称已存在"),
    EMAIL_CHECK_FALSE(515, "邮箱格式错误"),
    AUTHCODE_ERROR(516,"验证码错误"),
    SIGNATURE_LENGTH_LIMIT(517,"个性签名不能超过30字" ),
    COMMENT_NOT_NULL(518,"评论内容不能为空" ),
    COMMENT_NOT_SELF(519,"不能给自己回复哦~" ),
    TAG_NAME_NULL(520,"标签名不能为空" ),
    CATEGORY_ARTICLE_EXIST(521,"请先删除所属分类下的文章" ),
    ARTICLE_TOP_MAX(522,"置顶文章不能超过5个" ),
    ADMIN_UPDATE_ERROR(523, "超级管理员权限不可修改"),
    ADMIN_REMOVE_ERROR(524, "超级管理员不可删除"),
    ADMIN_STOP_ERROR(525, "超级管理员不可停用"),
    DELETE_LOGIN_USER(526,"不能删除当前用户" ),
    NO_POWER(527, "权限不足"),
    SUPER_ADMIN_LIMIT(528, "只能有一个超级管理员"),
    NEWPWD_NOT_NULL(529, "新密码不能为空"),
    EMAIL_NOT_EXIST(530, "邮箱不存在"), USER_NO_POWER(531, "普通用户不能分配权限"),
    NO_POWER_UPDATE(532, "你无法修改超级管理员信息"),
    TAG_EXIST(533, "标签已存在"), ARTICLE_TAG_MAX(534, "文章标签不能超过三个"),
    RPASSWORD_ERROR(535, "两次输入密码不一致"),
    SENTENCE_CONTENT_NULL(520,"句子内容不能为空" ),
    SENTENCE_SOURCE_NULL(520,"句子来源不能为空" ),
    ARTICLE_COMMENT_NO(521, "该文章不允许评论"),
    CATEGORY_NULL(522, "文章所属分类不能为空"),
    AUDIO_DOWNLOAD_ERR(523, "语音生成失败，请稍后再试"),
    AUDIO_UPLOAD_ERR(524, "语音识别失败，请稍后再试"), AUDIT_ERROR(525, "包含已审核项，请重新选择");

    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
